<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
${model.message }
<table>
<tr><td>ID</td><td>AlbumID</td><td>Title</td><td>Description</td><td>Length</td><td>Width</td>
<td>Viewed</td><td>Commented</td><td>Uploaded</td><td>LastViewed</td>
<td>IsPreview</td><td>Suggested</td>
<td>SetPreview</td><td>Join</td>
<security:authorize ifAnyGranted="ROLE_ADMIN">
<td>Suggest</td></security:authorize>
<td>Edit</td>
<td>Delete</td></tr>
<c:forEach items="${model.photo }" var="p">
<tr><td>${p.id }</td><td>${p.albumID }</td><td>${p.name }</td><td>${p.description }</td>
<td>${p.lenth }</td><td>${p.width }</td><td>${p.viewed }</td><td>${p.commented }</td>
<td>${p.uploaded }</td><td>${p.lastViewed }</td>
<td>${p.photopreview }</td><td>${p.suggested }</td>
<td><c:if test="${!p.photopreview }"><a href="setpreview.htm?photoid=${p.id }">SetPreview</a></c:if></td>
<td><c:if test="${p.competitionid!=1 }"><a href="joinphoto.htm?photoid=${p.id }">Join Competition</a></c:if>
<c:if test="${p.competitionid==1 }"><a href="quitphoto.htm?photoid=${p.id }">Quit Competition</a></c:if></td>
<security:authorize ifAnyGranted="ROLE_ADMIN">
<td>
<c:if test="${!p.suggested }"><a href="suggestphoto.htm?photoid=${p.id }">Suggest</a></c:if>
<c:if test="${p.suggested }"><a href="unsuggestphoto.htm?photoid=${p.id }">Unsuggest</a></c:if>
</td></security:authorize>
<td><a href="editphoto.htm?photoid=${p.id }">Edit</a></td>
<td><a href="delphoto.htm?photoid=${p.id }">Delete</a></td></tr>
</c:forEach>
</table>
</body>
</html>